package com.seabook.happy.website.utils;

import java.text.SimpleDateFormat;
import java.util.Date;

public class DateUtils {
	public static final String DEFAULT_DATE_FORMAT = " -- (HH:mm dd-MM-yyyy)";
	public static final String BLOG_DATE_FORMAT = "dd MM, yyyy";
	

	public static String parseDate(Date date, String format) {
		SimpleDateFormat sdf = new SimpleDateFormat(format);
		return sdf.format(date);
	}
	
	public static String parseDate(Date date) {
		String dateFomart = " -- (HH:mm dd-MM-yyyy)";
		SimpleDateFormat sdf = new SimpleDateFormat(dateFomart);
		return sdf.format(date);
	}

	public static String getMonthDesc(int month) {
		switch (month) {
		case 1:
			return "Jan";
		case 2:
			return "Feb";
		case 3:
			return "Mar";
		case 4:
			return "Apr";
		case 5:
			return "May";
		case 6:
			return "Jun";
		case 7:
			return "Jul";
		case 8:
			return "Aug";
		case 9:
			return "Sep";
		case 10:
			return "Oct";
		case 11:
			return "Nov";
		case 12:
			return "Dec";
		}
		return "Error";
	}

}
// 0488775742